home *** CD-ROM | disk | FTP | other *** search
- Path: news.belwue.de!uzwil!kuehl
- From: kuehl@uzwil.informatik.uni-konstanz.de (Dietmar Kuehl)
- Newsgroups: comp.lang.c++
- Subject: Re: bitfield
- Date: 15 Apr 1996 22:13:48 GMT
- Organization: FakultΣt fⁿr Mathematik und Informatik
- Message-ID: <4kuhms$2hg@news.BelWue.DE>
- References: <3172B547.1F54@braunschweig.netsurf.de>
- Reply-To: dietmar.kuehl@uni-konstanz.de
- NNTP-Posting-Host: uzwil.informatik.uni-konstanz.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi,
- Dieter Lⁿcking (luecking@braunschweig.netsurf.de) wrote:
- : struct BITS
- : {
- : int bits : 3;
- : };
-
- : BITS array[8];
-
- : How much memory needs array ?
-
- This depends on the compiler and the platform's ABI. Maybe
- 'sizeof(BITS)' is '8' (if a 'struct' containing some data is allowed to
- be put into a 'char'; this is unlikely), or, which is more likely, '16'
- if 'sizeof(int) == 2' or '32' if 'sizeof(int) == 4' (if a 'struct' can
- be placed into an 'int').
- --
- dietmar.kuehl@uni-konstanz.de
- http://www.informatik.uni-konstanz.de/~kuehl/
- I am a realistic optimist - that's why I appear to be slightly pessimistic
-